package test.model;

import test.service.MethodAccessor;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : example
 * @ Author: XuLeHuang
 * @ Date: 2022/12/10 11:23
 * @ Description:
 */
public class UserMethodAccess   {
    public void set(Object o, String methodName,Object arg){
        User user = (User) o;
        if (methodName.equalsIgnoreCase("setname") || methodName.equalsIgnoreCase("Name")) {
            user.setName((java.lang.String) arg);}

        if (methodName.equalsIgnoreCase("setid") || methodName.equalsIgnoreCase("Id")) {
            user.setId((java.lang.String) arg);}

        if (methodName.equalsIgnoreCase("setsex") || methodName.equalsIgnoreCase("Sex")) {
            user.setSex((java.lang.String) arg);}

        if (methodName.equalsIgnoreCase("setaddr") || methodName.equalsIgnoreCase("addr")) {
            user.setAddr((java.lang.String) arg);}

        if (methodName.equalsIgnoreCase("setemail") || methodName.equalsIgnoreCase("Email")) {
            user.setEmail((java.lang.String) arg);}

        if (methodName.equalsIgnoreCase("setage") || methodName.equalsIgnoreCase("age")) {
            user.setAge((java.lang.String) arg);}
    }
}